//
//  StrategyTableViewCell.m
//  Qyer
//
//  Created by 赵宇 on 15/9/12.
//  Copyright (c) 2015年 赵宇. All rights reserved.
//

#import "StrategyTableViewCell.h"
#import "BaseHeader.h"
@implementation StrategyTableViewCell
-(instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        UICollectionViewFlowLayout *flow = [[UICollectionViewFlowLayout alloc]init];
        flow.itemSize = CGSizeMake(SCREEN_WIDTH/7, SCREEN_HEIGHT/10);
        flow.sectionInset = UIEdgeInsetsMake(5, 5, 5, 5);
        flow.scrollDirection = UICollectionViewScrollDirectionVertical;
        
        _strategyCollection = [[UICollectionView alloc]initWithFrame:CGRectMake(0, 0, SCREEN_WIDTH/4*3, SCREEN_HEIGHT/4) collectionViewLayout:flow];
        _strategyCollection.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:self.strategyCollection];

        [_strategyCollection registerClass:[StrategyCollectionViewCell class] forCellWithReuseIdentifier:@"SCVcell"];
        
    }
    return self;
}
-(void)setDelegate:(id<UICollectionViewDelegate>)delegate
{
    [self.strategyCollection setDelegate:delegate];
    
}
-(void)setDataSource:(id<UICollectionViewDataSource>)dataSource
{
    [self.strategyCollection setDataSource:dataSource];
}


- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
